﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;
using System.Data.SqlClient;

namespace BLL
{
    public class makebll
    {
        /// <summary>
        /// 预约
        /// </summary>
        /// <param name="ma"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public static int insertmake(makemodel ma, string id)
        {
            return DAL.makedal.insertmake(ma, id);
        }
        /// <summary>
        /// 显示当前客户预约的房间信息
        /// </summary>
        /// <param name="roomtid"></param>
        /// <returns></returns>
       public static List<MakeroomModel> showmakeroom(string roomtid)
        {
            return DAL.makedal.showmakeroom(roomtid);
        }
        /// <summary>
        /// 删除预约信息
        /// </summary>
        /// <returns></returns>
        public static int DeleteMake(string id)
        {
            string sqlstr = "delete from make where mid=@mid";
            SqlParameter[] para = new SqlParameter[]
            {
                new SqlParameter("@mid",id),
            };
            int r = DBhelper.executenonquery(sqlstr, para);
            return r;
        }
    }
}
